package com.usian.menu.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.usian.menu.bean.Menu;
import com.usian.menu.service.MenuService;

@Controller
@RequestMapping("/menu")
public class MenuAction {
	@Autowired
	private MenuService menuService;

	@RequestMapping("/getMenuListJSON")
	@ResponseBody
	public List<Menu> findmenu(Menu menu ,Model model){
		System.out.println("----------------------"+menuService.findmenu());
		return menuService.findmenu();
	}

}
